#ifndef _EPCSX_H_
#define _EPCSX_H_

struct epcs_dev {
	int fd;
	char pid;
	char *desc;
	unsigned long num_sector;
	unsigned long page_per_sector;
	unsigned long byte_per_page;
	unsigned long sector_sz;
};


int  epcs_close(struct epcs_dev *dev);
int epcs_open(char *device, struct epcs_dev **dev, unsigned long ispeed);
int epcs_erase_bulk(struct epcs_dev *dev);
void epcs_erase_sector(struct epcs_dev *dev, unsigned int addr);
int epcs_write_page(struct epcs_dev *dev, unsigned int addr, unsigned char *data, unsigned int len);
int epcs_read_page(struct epcs_dev *dev, unsigned int addr, unsigned char *data, unsigned int len);
unsigned int epcs_size(struct epcs_dev *dev);


#endif

